package org.devf.fork.imsimulator.service.chat;

import org.devf.fork.imsimulator.model.CurChatModel;
import org.devf.fork.imsimulator.model.UserModel;
import org.devf.fork.imsimulator.socket.dto.BasePackets;
import org.devf.fork.imsimulator.socket.dto.MsgStatus;

/**
 *
 * IChatSession related
 *
 * @author wanghuafu
 * @since 1.0  2023/9/22 16:55
 */
public interface IChat {


    /**
     * 查询聊天消息
     * @return
     */
    CurChatModel getChatSession(Long chatId);


    /**
     * 保存聊天消息
     * @param dest
     * @param packets
     */
    void putChatMessage(Long key,UserModel dest , BasePackets packets);


//    /**
//     * 查询未读的聊天消息
//     * @param key
//     * @return
//     */
//    List<BasePackets> getUnReadMessage(Long key);

    /**
     * 更新消息状态
     * @param key 聊天ID
     * @param id  消息ID
     * @param msgStatus 消息状态
     */
    boolean updateMessageState(Long key , String id, MsgStatus msgStatus);

}
